html {
    height: 100%
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
}

ul {
    padding-left: 0;
    margin: 0
}

li {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: normal;
}

a {
    cursor: pointer;
    text-decoration: none;
}

div, section, nav, p, article, header, footer, h1, h2, h3, h4, h5, h6, ul, li, ol {
    box-sizing: border-box;
}

body, input, select, textarea, button {
    font-family: 'Microsoft YaHei', "PingFang SC", "Hiragino Sans GB", -apple-system, Arial;
}

.full {
    height: 100%;
    width: 100%;
}

/* 自适应布局*/
.full-ctn {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.full-ctn > * {
    position: absolute;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.lined {
    border-bottom: 1px solid #eee;
}

.toplined {
    border-top: 1px solid #eee;
}

.shaddowed {
    box-shadow: 0 0 4px 1px rgba(#000, 0.1);
}

.pre {
    white-space: pre-wrap;
    line-height: 1.5;
    word-break: break-all;
}

.hide {
    display: none;
}

.hide_v {
    visibility: hidden;
}

.inlnb {
    display: inline-block;
}

.no-border {
    border: none;
}

.bordered {
    border: 1px solid #ddd;
}

.radius {
    border-radius: 5px;
}

.pointer, .pointer * {
    cursor: pointer;
}

.lay-tbl {
    display: table;
}

.lay-cell {
    display: table-cell;
    vertical-align: middle;
}

.left {
    float: left;
}

.right {
    float: right;
}

.clearfix {
    clear: both;
}

.clearfix-child:after {
    content: '';
    clear: both;
    display: block;
}

.b-center {
    margin: auto;
}

.t-left {
    text-align: left;
}

.t-center {
    text-align: center;
}

.flex {
    display: flex;
}

.f-middle {
    display: flex;
    align-items: center;
}

.f-center {
    display: flex;
    justify-content: center;
}

.f-wrap {
    flex-wrap: wrap;
}

.f-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.f-column {
    display: flex;
    flex-direction: column;
}

.no-shrink {
    flex-shrink: 0;
}

.f-grow {
    flex-grow: 1;
}

.f-end {
    justify-content: flex-end;
}

.t-right {
    text-align: right;
}

.v-top {
    vertical-align: top;
}

.v-middle {
    vertical-align: middle;
}

.v-bottom {
    vertical-align: bottom;
}

.w100 {
    width: 100%;
}

.h100 {
    height: 100%;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

.clear:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden
}

.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nowrap {
    white-space: nowrap;
}

.auto-bar {
    overflow: auto;
}

.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

.white-bg {
    background: #fff;
}

.pre {
    white-space: pre-wrap;
}

.bold {
    font-weight: bold;
}

//最大4块，自动调整为4、3、2、1块并撑满
.flex-4 {
    flex-basis: 21%;
    flex-grow: 1;
}

@media (max-width: 1400px) {
    .flex-4 {
        flex-basis: 26%;
    }
}

@media (max-width: 1100px) {
    .flex-4 {
        flex-basis: 34%;
    }
}

@media (max-width: 800px) {
    .flex-4 {
        flex-basis: 51%;
    }
}


//常用的10px 20px间距和空白
$areas: (t: top, r: right, b: bottom, l: left);
$sizes: 20 10;
@each $size in $sizes {
    .pd-#{$size} {
        padding: #{$size}px;
    }
    .mg-#{$size} {
        margin: #{$size}px;
    }
}

@each $size in $sizes {
    @each $key, $area in $areas {
        .pd#{$key}-#{$size} {
            padding-#{$area}: #{$size}px;
        }
        .mg#{$key}-#{$size} {
            margin-#{$area}: #{$size}px;
        }
    }
}

//0间距
@each $key, $area in $areas {
    .pd#{$key}-0 {
        padding-#{$area}: 0;
    }
}
